package gxt.visual.selection.event;

import gxt.visual.selection.provider.ISingleSelectionProvider;

import java.util.List;

/**
 * @author eugenp
 */
public class GenericSelectionChangedEvent< T > extends GenericSelectionEvent< T >{
	private ISingleSelectionProvider< T > provider;
	
	/**
	 * Creates a new selection event.
	 * @param providerToSet the selection provider
	 * @param selectionToSet the selection
	 */
	public GenericSelectionChangedEvent( final ISingleSelectionProvider< T > providerToSet, final List< T > selectionToSet ){
		super( selectionToSet );
		
		this.provider = providerToSet;
	}
	/**
	 * Creates a new selection event.
	 * @param providerToSet the selection provider
	 * @param selectionToSet the selection
	 */
	public GenericSelectionChangedEvent( final ISingleSelectionProvider< T > providerToSet, final T selectionToSet ){
		super( selectionToSet );
		
		this.provider = providerToSet;
	}
	
	//
	/**
	 * Returns the selection provider.
	 * @return the provider
	 */
	public ISingleSelectionProvider< T > getSelectionProvider(){
		return this.provider;
	}
	
}
